<?php
function authors_dropdown() {
    $get_tags = get_terms('authors', 'order_by=name');
    $dropdown = '';
    $dropdown_start = '<select id="select_authors" name="select_authors">';
    $dropdown_start .= sprintf('<option>%s</option>', __('Select Authors', 'adw'));
    foreach($get_tags as $tag):
        $dropdown .= sprintf('<option onclick="sendText(document.post.bookauthors, \'%2$s, \');" href="javascript:;" value="%1$s">%2$s</option>', get_term_link($tag->slug, 'authors'), $tag->name);
    endforeach;
    $dropdown_end = '</select>';
    echo $dropdown_start.$dropdown.$dropdown_end;
}
function editions_dropdown() {
    $get_tags = get_terms('editions', 'order_by=name');
    $dropdown = '';
    $dropdown_start = '<select id="select_editions" name="select_editions">';
    $dropdown_start .= sprintf('<option>%s</option>', __('Select Editions', 'adw'));
    foreach($get_tags as $tag):
        $dropdown .= sprintf('<option onclick="sendText(document.post.bookeditions, \'%2$s, \');" href="javascript:;" value="%1$s">%2$s</option>', get_term_link($tag->slug, 'editions'), $tag->name);
    endforeach;
    $dropdown_end = '</select>';
    echo $dropdown_start.$dropdown.$dropdown_end;
}
function publishers_dropdown() {
    $get_tags = get_terms('publishers', 'order_by=name');
    $dropdown = '';
    $dropdown_start = '<select id="select_publishers" name="select_publishers">';
    $dropdown_start .= sprintf('<option>%s</option>', __('Select Publishers', 'adw'));
    foreach($get_tags as $tag):
        $dropdown .= sprintf('<option onclick="sendText(document.post.bookpublishers, \'%2$s, \');" href="javascript:;" value="%1$s">%2$s</option>', get_term_link($tag->slug, 'publishers'), $tag->name);
    endforeach;
    $dropdown_end = '</select>';
    echo $dropdown_start.$dropdown.$dropdown_end;
}
function classcat_dropdown() {
    $get_tags = get_terms('classcat', 'order_by=name');
    $dropdown = '';
    $dropdown_start = '<select id="select_classcat" name="select_classcat">';
    $dropdown_start .= sprintf('<option>%s</option>', __('Select Class/Category', 'adw'));
    foreach($get_tags as $tag):
        $dropdown .= sprintf('<option onclick="sendText(document.post.bookclasscat, \'%2$s, \');" href="javascript:;" value="%1$s">%2$s</option>', get_term_link($tag->slug, 'classcat'), $tag->name);
    endforeach;
    $dropdown_end = '</select>';
    echo $dropdown_start.$dropdown.$dropdown_end;
}
?>